package com.cqhfan.interactionservice.controller;

import com.cqhfan.interactionservice.service.LikedRecordService;
import com.cqhfan.pojo.interaction.dto.AddLikedRecordDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

/**
 * @author 眭传洪
 * @create 2025-08-14 16:18
 */
@RestController
@RequestMapping("/likedRecord")
@RequiredArgsConstructor
public class LikedRecordController {

    private final LikedRecordService likedRecordService;

    @PostMapping("/addLikedRecord")
    public void addLikedRecord(@RequestBody AddLikedRecordDTO body) {
        likedRecordService.addLikedRecord(body);
    }

    @GetMapping("/listLikeStatus")
    public Set<Long> listLikeStatus(@RequestParam("bizIds") List<Long> bizIds) {
        return likedRecordService.listLikeStatus(bizIds);
    }

}
